<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>发送邮件</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
 <div class="container mt-5">
        <div class="row justify-content-center">
            <div class="col-md-6">
                <div class="card">
                    <div class="card-body">
					    <h2>发送带附件的邮件</h2>
					    <div th:if="${successMessage}" class="alert alert-success" role="alert">
                            发送成功！
                        </div>
					    <form th:action="@{/send-email}" method="post" enctype="multipart/form-data">
					    	<div class="form-group">
						        <label for="to">收件人：</label>
						        <input type="text" class="form-control" id="to" name="to" required/><br/>
					        </div>
					        <div class="form-group">
						        <label for="subject">主题：</label>
						        <input type="text" class="form-control" id="subject" name="subject" required/><br/>
					        </div>
					        <div class="form-group">
						        <label for="username">用户名：</label>
						        <input type="text" class="form-control" id="username" name="username" required/><br/>
					        </div>
					        <div class="form-group">
						        <label for="file">附件：</label>
						        <input type="file"  class="form-control-file" id="file" name="file"/><br/>
					        </div>
					        <button type="submit" class="btn btn-primary">发送</button>
					    </form>
					</div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>